package com.assumejson.transaction.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author gang.Li
 * @version 1.0
 * @since 1.0 2021/12/13 10:38
 */
@Component
public class UserService {

	@Autowired
	public JdbcTemplate jdbcTemplate;


	@Transactional
	public void test() {
		jdbcTemplate.execute("insert  into t1 values(1,1,1,1,'1')");
		System.out.println("test");
	}
}
